/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package horizon.map;

import horizon.collision.CollisionBox;
import horizon.collision.CollisionManager;
import horizon.component.StaticCollisionComponent;
import horizon.component.StaticRender;
import horizon.entity.Entity;

public class Tile extends Entity{
    
    public Tile(String id , CollisionManager c){
        super(id);
        
        this.AddComponent(new StaticCollisionComponent("Collision" , c));
        this.AddComponent(new StaticRender("Render" , "null"));
        
    }
    protected void setCollisionAndTexture(String textureName , CollisionBox b){
        
        ((StaticRender)this.getComponent(StaticRender.class)).setTexture(textureName);
        ((StaticCollisionComponent)this.getComponent(StaticCollisionComponent.class)).box = b;
        
    }
     protected void setTexture(String textureName){
         
         ((StaticRender)this.getComponent(StaticRender.class)).setTexture(textureName);
         
     }
    
}
